<template>
  <div id="app">
    <Header />
    <router-view />
    <Footer />
    <Customer />
  </div>
</template>

<script>
import Header from '@/components/Header'
import Footer from '@/components/Footer'
import Customer from '@/components/Customer'
import { mapActions, mapGetters } from 'vuex'
export default {
  components: {
    Header,
    Footer,
    Customer
  },
  created() {
    let id = localStorage.getItem('id')
    if (id) this.getUserInfo({ id })
  },
  methods: {
    ...mapActions(['getUserInfo']),
    ...mapGetters(['_userInfo'])
  },
  watch: {
    // _userInfo(newValue, oldValue) {
    // }
  }
}
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
